package com.ck.company.service.impl;

import com.ck.company.service.CpSceneSourceService;
import com.ck.dao.SceneSourceMapper;
import com.ck.model.common.SceneSource;
import com.ck.model.company.bo.CpSceneSourceZipBO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 场景素材
 *
 * @author linqiang
 * @version v1.0
 * @date 2018-09-12 17:18
 */
@Service("cpSceneSourceService")
public class CpSceneSourceServiceImpl implements CpSceneSourceService {

    @Autowired
    private SceneSourceMapper sceneSourceMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public int batchInsert(List<SceneSource> sceneSourceList) {
        return sceneSourceMapper.batchInsert(sceneSourceList);
    }

    @Override
    public List<CpSceneSourceZipBO> listByProgramVersion(String programVersion) {
        return sceneSourceMapper.listByProgramVersion(programVersion);
    }
}
